package cn.edu.sdjzu.xg.eagle.dao;

import cn.edu.sdjzu.xg.eagle.entity.User;
import cn.edu.sdjzu.xg.eagle.entity.authority.UserAssRole;

import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;

/**
 * @author tg.si@188.com
 * @todo
 * @since 2024/4/15 20:00
 */
public interface UserAssRoleDao {
    boolean add(Connection connection, UserAssRole userAssRole) throws SQLException;

    UserAssRole find(Connection connection, Integer id) throws SQLException, InvocationTargetException;

    Collection<UserAssRole> findAll(Connection connection, User user) throws SQLException;

    Collection<UserAssRole> findAll(Connection connection) throws SQLException, InvocationTargetException;

    boolean update(Connection connection, UserAssRole userAssRole) throws SQLException;

    boolean delete(Connection connection, Integer id) throws SQLException;
}
